<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="index.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<!-- <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="favicon.ico" >
    <link rel="Shortcut Icon" href="favicon.ico" /> -->

<!-- <title>主页</title>
    <meta name="keywords" content="耶回收">
    <meta name="description" content="耶回收"> -->

<link href="<%=basePath%>lib/webuploader/0.1.5/webuploader.css"
	rel="stylesheet" type="text/css" />
</head>

<body>

	<!--_表格--开始-->
	<section class="Hui-article-box" style="overflow: auto"> <nav
		class="breadcrumb"> <i class="Hui-iconfont">&#xe67f;</i> 首页 <span
		class="c-gray en">&gt;</span> 订单管理 <span class="c-gray en">&gt;</span>
	配件更换记录 <span class="c-gray en">&gt;</span> 添加记录 </nav> <!--     checkBackitemExsit() -->
	
	<div class="page-container">
	  <div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
				 <a class="btn btn-primary radius" href="javascript:history.go(-1);">返回</a>
				</span>
               
            </div>
		<form  id="checkForm" class="form form-horizontal" action="saveAdd" method="POST" onsubmit="return f1()&&f2()&&f3()&&f4()&&f5()&&f6()" >
			
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>手机号：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text" value=""  id="phone" name="phone" placeholder="请输入手机号">
				</div>
			</div>
			
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>处理器：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text processor"   value=""  id="processor" name="processor" placeholder="请输入处理器型号">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>处理器数量：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text processor" value=""  id="processor_num" name="processor_num" placeholder="请输入处理器数量">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>处理器价格：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text processor" value=""  id="processor_price" name="processor_price" placeholder="请输入处理器价格">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>内存：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text memory" value=""  id="memory" name="memory" placeholder="请输入内存型号">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>内存数量：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text memory" value=""  id="memory_num" name="memory_num" placeholder="请输入内存数量">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>内存价格：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text memory" value=""  id="memory_price" name="memory_price" placeholder="请输入内存价格">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>主板：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text mainboard" value=""  id="mainboard" name="mainboard" placeholder="请输入主板型号">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>主板数量：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text mainboard" value=""  id="mainboard_num" name="mainboard_num" placeholder="请输入主板数量">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>主板价格：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text mainboard" value=""  id="mainboard_price" name="mainboard_price" placeholder="请输入主板价格">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>显卡：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text video_card" value=""  id="video_card" name="video_card" placeholder="请输入显卡型号">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>显卡数量：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text video_card" value=""  id="video_card_num" name="video_card_num" placeholder="请输入显卡数量">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>显卡价格：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text video_card" value=""  id="video_card_price" name="video_card_price" placeholder="请输入显卡价格">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>其他：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text other" value=""  id="other" name="other" placeholder="请输入 如:重装系统">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>价格：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="text" class="input-text other" value=""  id="other_price" name="other_price" placeholder="价格:101元">
				</div>
			</div>
			<!-- <div class="row cl">
				<label class="form-label col-xs-4 col-sm-2"><span
					class="c-red"></span>时间：</label>
				<div class="formControls col-xs-8 col-sm-4">
					<input type="date" class="input-text time" value=""  id="time" name="time" >
				</div>
			</div> -->
		
			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
					<input type="submit" class="btn btn-primary radius"  value="保存"  id="button">
				</div>
				
			</div>
				</form>
			</div>
	</section>
<script type="text/javascript">
function f6(){
	var phone=$("#phone").val();
	/* alert(phone.length); */
	if(phone==null||phone==""){
		layer.msg("手机号不能为空!");
		
	}else if(phone.length!=11){
		layer.msg("请输入合法手机号!");
		
	} else{
		
		return true;
	} 
	/* alert("adadd"); */
	return false;
}

function f5(){
	var t1=0;
	var t2=false;
	
	 $(".other").each(function(){
		 /* alert($(this).val()); */
		 if($(this).val()!=null&&$(this).val()!=""){
			 t1+=1; 
			 /* alert("1111111111111111111"); */
		 }
		 
		
	 });
	 /* alert(t1); */
	 if(t1==0||t1==2){
		 t2=true;
	 }else{
		 layer.msg("请填写其他类别相关信息"); 
	 }
	 return t2;
}
function f4(){
	var t1=0;
	var t2=false;
	
	 $(".video_card").each(function(){
		 if($(this).val()!=null&&$(this).val()!=""){
			 t1+=1;
		 }
		 
		 
	 });
	 if(t1==0||t1==3){
		 t2=true;
	 }else{
		 layer.msg("请填写显卡相关信息"); 
	 }
	 return t2;
}
function f3(){
	var t1=0;
	var t2=false;
	
	 $(".mainboard").each(function(){
		 if($(this).val()!=null&&$(this).val()!=""){
			 t1+=1;
		 }
		 
		 
	 });
	 if(t1==0||t1==3){
		 t2=true;
	 }else{
		 layer.msg("请填写主板相关信息"); 
	 }
	 return t2;
}
function f2(){
	var t1=0;
	var t2=false;
	
	 $(".memory").each(function(){
		 if($(this).val()!=null&&$(this).val()!=""){
			 t1+=1;
		 }
		 
		
	 });
	 if(t1==0||t1==3){
		 t2=true;
	 }else{
		 layer.msg("请填写内存相关信息"); 
	 }
	 return t2;
}
    function f1(){
    	var t1=0;
    	var t2=false;
    	
    	 $(".processor").each(function(){
    		 if($(this).val()!=null&&$(this).val()!=""){
    			 t1+=1;
    		 }
    		 
    		
    	 });
    	 if(t1==0||t1==3){
    		 t2=true;
    	 }else{
    		 layer.msg("请填写处理器相关信息"); 
    	 }
    	 
    	 return t2;

    }

	$("#phone").blur(function(){
		
		//alert("-----");
		var phone=$("#phone").val();
		//alert(phone);
		if(phone==null||phone==""){
			layer.msg("手机号不能为空");
			return false;
		}else if(phone.length!=11){
			layer.msg("请输入合法手机号!");
		}
	});

</script>


			

</body>
</html>